<?php 
	
		if ($_GET) {
			
		$id = $_GET['id'];
		$db = include "./db.php";
		$row = $db[$id];
		include "./Tpl/edit.html";
	}else{
		$id = $_POST['id'];
		$data = $_POST;
		$data['create_time'] = time();
		$db = include "./db.php";
		$db[$id] = $data;
		$str = var_export($db,true);
		$str = "<?php return ".$str."?>";
		file_put_contents("./db.php", $str);
		header('location:./index.php');
	}


 ?>